free (buf);
}
-guint32
-broadway_output_query_pointer (BroadwayOutput *output, int id)
-{
- char buf[HEADER_LEN + 3];
- guint32 serial;
- int p;
-
- serial = output->serial;
- p = write_header (output, buf, 'q');
- append_uint16 (id, buf, &p);
-
- assert (p == sizeof (buf));
-
- broadway_output_write (output, buf, sizeof (buf));
-
- return serial;
-}
-
void
broadway_output_grab_pointer (BroadwayOutput *output,
int id,
int n_rects,
int dx,
int dy);
-guint32 broadway_output_query_pointer (BroadwayOutput *output,
- int id);
void broadway_output_grab_pointer (BroadwayOutput *output,
int id,
gboolean owner_event);
flushSurface(surfaces[id]);
break;
- case 'q': // Query pointer
- var id = base64_16(cmd, i);
- i = i + 3;
-
- var pos = getPositionsFromAbsCoord(lastX, lastY, id);
-
- sendInput ("q", [pos.rootX, pos.rootY, pos.winX, pos.winY, windowWithMouse]);
- break;
-
case 'g': // Grab
var id = base64_16(cmd, i);
i = i + 3;
msg.grab_reply.res = strtol(p, &p, 10);
break;
- case 'q':
- msg.query_reply.root_x = strtol(p, &p, 10);
- p++; /* Skip , */
- msg.query_reply.root_y = strtol(p, &p, 10);
- p++; /* Skip , */
- msg.query_reply.win_x = strtol(p, &p, 10);
- p++; /* Skip , */
- msg.query_reply.win_y = strtol(p, &p, 10);
- p++; /* Skip , */
- msg.query_reply.window_with_mouse = strtol(p, &p, 10);
-
- break;
default:
g_printerr ("Unknown input command %s\n", message);
break;
int res;
} BroadwayInputGrabReply;
-typedef struct {
- BroadwayInputBaseMsg base;
- int root_x;
- int root_y;
- int win_x;
- int win_y;
- guint32 window_with_mouse;
-} BroadwayInputQueryReply;
-
typedef union {
BroadwayInputBaseMsg base;
BroadwayInputPointerMsg pointer;
BroadwayInputScrollMsg scroll;
BroadwayInputKeyMsg key;
BroadwayInputGrabReply grab_reply;
- BroadwayInputQueryReply query_reply;
} BroadwayInputMsg;
struct _GdkBroadwayDisplay